import Vue from "vue";
import VueRouter from "vue-router";

import appHome from '@/views/appHome';
import appSort from '@/views/appSort';
import appCart from '@/views/appCart';
import appMine from '@/views/appMine';
import App404  from '@/views/app404';


Vue.use(VueRouter);

const routes = [ 

    
    {
      name:'apphome',
      path:'/apphome',
      component:appHome,
    },
    {
      path:'/',
      redirect:appHome,
    },
   
    {
      path:'/appsort',
      component:appSort,
    },
    {
      path:'/appcart',
      component:appCart,
    },
    {
      path:'/appmine',
      component:appMine,
    },
    {
      path:'*',
      component:App404,
    },

  ]


const router = new VueRouter({
  mode: "history",
  
  routes
});

//导出

export default router;
